// Copyright (c) 2022 Presto Labs Pte. Ltd.
// Author: fengyang

#pragma once

#include <map>
#include <memory>
#include <regex>
#include <string>
#include <vector>

// internal
#include "coin2/exchange/base/feed/processor.h"
#include "coin2/exchange/base/market/enums.h"
#include "coin2/exchange/di/constant.h"
#include "coin2/exchange/util/json_util.h"

namespace coin2::exchange::crypto_common::feed_v2 {
namespace impl {
using namespace coin2::exchange::base::symbology;
class CryptoFeedProcessor : public base::feed::FeedParsingProcessor {
 public:
  struct CryptoChannel {
    std::string channel;
    std::string channel_sign;
    std::string native_symbol;
    std::map<std::string, std::string> parameters;
  };
  explicit CryptoFeedProcessor(
      const std::string& system_name,
      const coin2::exchange::di::ConstantInjection& ci,
      const feed::RawParserConfig& config,
      const MarketExchangeApi& mea)
      : FeedParsingProcessor(
            system_name,
            mea,
            ci,
            config,
            "cc/coin2/exchange/crypto_common/feed_v2/schema.json") {}
  void OnTopicRecord(const base::executor::TopicRecordPacket& packet) override;
};
};  // namespace impl

using impl::CryptoFeedProcessor;
}  // namespace coin2::exchange::crypto_common::feed_v2
